import React, { Component } from 'react'
import Son from './Son'

export default class Father extends Component {
    state = {
        num: null
    }
    sendMsg = (num) => {
        this.setState({
            num
        })
    }
    render() {
        return (
            <div>
                我是父组件  ---- { this.state.num }
                <Son sendMsg = { this.sendMsg }/>
            </div>
        )
    }
}
